home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / ewl / ewl_window.h < prev    next >
C/C++ Source or Header  |  2006-01-09  |  4KB  |  99 lines

  1. #ifndef __EWL_WINDOW_H__
  2. #define __EWL_WINDOW_H__
  3.  
  4. /**
  5.  * @file ewl_window.h
  6.  * @defgroup Ewl_Window Window: A Container for Displaying in a New Window
  7.  * @brief Defines the Ewl_Window class which extends the Ewl_Embed class by
  8.  * creating it's own window and evas.
  9.  *
  10.  * @{
  11.  */
  12.  
  13. /**
  14.  * @themekey /window/file
  15.  * @themekey /window/group
  16.  */
  17.  
  18. /**
  19.  * The window structure is mostly a container for holding widgets and a
  20.  * wrapper around the xlib window.
  21.  */
  22. typedef struct Ewl_Window Ewl_Window;
  23.  
  24. /**
  25.  * @def EWL_WINDOW(win)
  26.  * Typecasts a pointer to an Ewl_Window pointer.
  27.  */
  28. #define EWL_WINDOW(win) ((Ewl_Window *) win)
  29.  
  30. /**
  31.  * @struct Ewl_Window
  32.  * Extends the Ewl_Embed class to create it's own window and evas for drawing,
  33.  * sizing and positioning.
  34.  */
  35. struct Ewl_Window
  36. {
  37.     Ewl_Embed       embed; /**< Inherits from the Ewl_Embed class */
  38.  
  39.     void           *window; /**< Provides a window for drawing */
  40.     Ewl_Window     *transient; /**< Window to be transient for */
  41.  
  42.     char           *title; /**< The current title on the provided window */
  43.     char           *name; /**< Current name on the provided window */
  44.     char           *classname; /**< Current class on the provided window */
  45.  
  46.      
  47.     Ewl_Window_Flags flags; /**< Flags indicating window properties */
  48.  
  49.     int             x; /**< Screen relative horizontal position of window */
  50.     int             y; /**< Screen relative vertical position of window */
  51.     char           *render; /**< The render engine in use */
  52.  
  53.     Ewl_Dnd_Types dnd_types;
  54.     Ewl_Widget* dnd_last_position;
  55. };
  56.  
  57. Ewl_Widget     *ewl_window_new(void);
  58. int             ewl_window_init(Ewl_Window *win);
  59. Ewl_Window     *ewl_window_window_find(void *window);
  60. void            ewl_window_title_set(Ewl_Window *win, char *title);
  61. char           *ewl_window_title_get(Ewl_Window *win);
  62. void            ewl_window_name_set(Ewl_Window *win, char *name);
  63. char           *ewl_window_name_get(Ewl_Window *win);
  64. void            ewl_window_class_set(Ewl_Window *win, char *classname);
  65. char           *ewl_window_class_get(Ewl_Window *win);
  66. void            ewl_window_borderless_set(Ewl_Window *win);
  67. void            ewl_window_move(Ewl_Window *win, int x, int y);
  68. void            ewl_window_position_get(Ewl_Window *win, int *x, int *y);
  69. void            ewl_window_raise(Ewl_Window *win);
  70. void            ewl_window_lower(Ewl_Window *win);
  71. void            ewl_window_transient_for(Ewl_Window *win, Ewl_Window * forwin);
  72. void            ewl_window_keyboard_grab_set(Ewl_Window *win, int grab);
  73. int             ewl_window_keyboard_grab_get(Ewl_Window *win);
  74. void            ewl_window_pointer_grab_set(Ewl_Window *win, int grab);
  75. int             ewl_window_pointer_grab_get(Ewl_Window *win);
  76. void            ewl_window_override_set(Ewl_Window *win, int override);
  77. int             ewl_window_override_get(Ewl_Window *win);
  78. void        ewl_window_dnd_aware_set(Ewl_Window *win);
  79.  
  80. /*
  81.  * Internally used callbacks, override at your own risk.
  82.  */
  83. void ewl_window_realize_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  84. void ewl_window_postrealize_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  85. void ewl_window_realize_transient_cb(Ewl_Widget *w, void *ev_data,
  86.                             void *user_data);
  87. void ewl_window_unrealize_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  88. void ewl_window_show_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  89. void ewl_window_expose_cb(Ewl_Widget *w, void *ev, void *user_data);
  90. void ewl_window_hide_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  91. void ewl_window_destroy_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  92. void ewl_window_configure_cb(Ewl_Widget *w, void *ev_data, void *user_data);
  93.  
  94. /**
  95.  * @}
  96.  */
  97.  
  98. #endif                /* __EWL_WINDOW_H__ */
  99.